﻿<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>日志列表</title>
<link rel="stylesheet" type="text/css" href="<s:property value="staticsRoot"/>/css/style.css"/>
<script type="text/javascript" src="<s:property value="staticsRoot"/>/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    $(".data tr:odd").css("background","#fff");
});
</script>
</head>

<body id="user_mag">
<div class="right">
	<h3 class="title box">
    	当前位置：k吧后台管理&nbsp;&gt;&gt;&nbsp;IP管理&nbsp;&gt;&gt;&nbsp;列表
    </h3>
     <form name="form2" id="form2" action="banIpAdd.html" method="post">
     <table cellpadding="0" cellspacing="0" width="100%" class="table_top box">
    	<tr>
    		<td width="30%" height="20" align="right">
                                          用户IP：
                <input type="text" class="i_text" name="ip" value="<s:property value='#request.ip' />"/> 
            </td>
            <td width="30%" height="20" align="right">
                                        到期时间：
                <input type="text" class="i_text" name="banTime" value="<s:property value='#request.ip' />"/>                          
            </td>
            <td align="left" style="padding-left:10px;">
            	<div class="lit_btn">
                    <a href="#" onclick="doSubmit()">添&nbsp;加</a>
                </div>
            </td>
        </tr>
    </table>
    </form>
    <form name="form1" id="form1" action="banIpList.html" method="post">
    <table cellpadding="0" cellspacing="0" width="100%" class="table_top box">
    	<tr>
        	<td width="30%" height="20" align="right">
                                          用户IP：
                <input type="text" class="i_text" name="queryStr" value="<s:property value='#request.ip' />"/>                        
            </td>
            <td align="left" style="padding-left:1px;">
            	<div class="lit_btn">
                    <a href="#" onclick="query()">查&nbsp;询</a>
                </div>
            </td>
        </tr>
    </table>
    <table cellpadding="0" cellspacing="0" width="100%" class="data">
    	<tr>
        	<td width="10%" height="29">ip</td>
            <td width="10%">到期时间</td>
            <td width="20%">创建时间</td>
             <td width="20%">操作</td>
        </tr>
        <s:iterator value="#request.list" var="banIp">
        	<tr>
	        	<td height="29"><s:property value="#banIp.ip"/></td>
	            <td><s:date name="#banIp.banTime" format="yyyy-MM-dd HH:mm:ss" /></td>
	            <td><s:date name="#banIp.gmtCreate" format="yyyy-MM-dd HH:mm:ss" /> </td>
	             <td><a href="./banIpdel.html?id=<s:property value="#banIp.id" />" >删除</a></td>
        	</tr>
        </s:iterator>
    </table>
    <%@include file="page.jsp" %>
    </form>
</div>

<script type="text/javascript">
	function query(){
		$("#form1").submit();
	}
	function doSubmit(){
		$("#form2").submit();
	}
	function doSearch(pageNumber){
		if(pageNumber <= 0){
			pageNumber = 1;
		}	
		$("#page").val(pageNumber); 
		$("#form1").submit(); 
	}
</script>
</body>
</html>
